function addFn() {
  let val = 0;
  return () => {
    return val++;
  };
}

//  词法作用域 ！！

let add = addFn();

console.log(add());
console.log(add());
console.log(add());
